﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace masinute
{
    class Program
    {
        static void Main(string[] args)
        {
            string TipMasina;
            string NumeMasina;
            List<Sedan> sedan = new List<Sedan>();
            List<Coupe> coupe = new List<Coupe>();
            List<Mini> mini = new List<Mini>();
            List<client> clienti = new List<client>();

            while (true)
            {
                Console.Write("1. Adaugati masina/client\n2. Exit\n");
                string raspuns = Console.ReadLine();

                if (raspuns == "2")
                    break;

                if (raspuns == "1")
                {
                    Console.Clear();
                    Console.Write("numele masinii: ");
                    NumeMasina = Console.ReadLine();

                    Console.Write("tipul masinii (sedan, coupe, mini): ");
                    TipMasina = Console.ReadLine();

                    switch (TipMasina)
                    {
                        case "sedan":
                            {
                                Console.Write("dotari: ");
                                string dotari = Console.ReadLine();

                                Console.Write("motorizare: ");
                                string motorizare = Console.ReadLine();

                                Console.Write("dimensiuni: ");
                                string dimensiuni = Console.ReadLine();

                                Sedan masina = new Sedan(dotari, motorizare, dimensiuni);

                                Console.Write("culoare: ");
                                string culoare = Console.ReadLine();

                                Console.Write("transmisie: ");
                                string transmisie = Console.ReadLine();

                                masina.SetCaracteristici(culoare, transmisie);

                                sedan.Add(masina);

                                Console.Write("nume client: ");
                                string nume = Console.ReadLine();

                                Console.Write("varsta client: ");
                                string varsta = Console.ReadLine();

                                client client = new client(nume, varsta, masina);

                                clienti.Add(client);

                                break;
                            }
                        case "coupe":
                            {
                                Console.Write("dotari: ");
                                string dotari = Console.ReadLine();

                                Console.Write("motorizare: ");
                                string motorizare = Console.ReadLine();

                                Console.Write("dimensiuni: ");
                                string dimensiuni = Console.ReadLine();

                                Coupe masina = new Coupe(dotari, motorizare, dimensiuni);

                                Console.Write("culoare: ");
                                string culoare = Console.ReadLine();

                                Console.Write("transmisie: ");
                                string transmisie = Console.ReadLine();

                                masina.SetCaracteristici(culoare, transmisie);

                                coupe.Add(masina);

                                Console.Write("nume client: ");
                                string nume = Console.ReadLine();

                                Console.Write("varsta client: ");
                                string varsta = Console.ReadLine();

                                client client = new client(nume, varsta, masina);

                                clienti.Add(client);

                                break;
                            }
                        case "mini":
                            {
                                Console.Write("dotari: ");
                                string dotari = Console.ReadLine();

                                Console.Write("motorizare: ");
                                string motorizare = Console.ReadLine();

                                Console.Write("dimensiuni: ");
                                string dimensiuni = Console.ReadLine();

                                Mini masina = new Mini(dotari, motorizare, dimensiuni);

                                Console.Write("culoare: ");
                                string culoare = Console.ReadLine();

                                Console.Write("transmisie: ");
                                string transmisie = Console.ReadLine();

                                masina.SetCaracteristici(culoare, transmisie);

                                mini.Add(masina);

                                Console.Write("nume client: ");
                                string nume = Console.ReadLine();

                                Console.Write("varsta client: ");
                                string varsta = Console.ReadLine();

                                client client = new client(nume, varsta, masina);

                                clienti.Add(client);

                                break;
                            }

                    }

                }

            }

        }
    }
}
